package cc.fs.study.guideview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewStub;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import cc.fs.study.R;

public class GuideViewActivity extends AppCompatActivity {

    private ViewStub guideViewStub;
    private List<View> childViews = new ArrayList<>();
    private GuideView guideView;
    private TextView oneView,twoView,threeView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide_view);

        setupView();
        setupEvent();
    }

    private void setupView() {
        guideViewStub = (ViewStub)findViewById(R.id.guideViewStub);
        oneView = (TextView)findViewById(R.id.targetId1);
        twoView = (TextView)findViewById(R.id.targetId2);
        threeView = (TextView)findViewById(R.id.targetId3);

        guideViewStub.inflate();
        guideView = (GuideView)findViewById(R.id.guideView);

        childViews.add(oneView);
        childViews.add(twoView);
        childViews.add(threeView);
        guideView.setViewList(childViews);
    }

    private void setupEvent() {
    }
}
